package com.cysyz.mylib.utils;

import com.cysyz.mylib.utils.myassert.MyAssert;

public abstract class MyStringFormatUtils {
	public static String toAbcd(String inputValue) {
		MyAssert.notNull(inputValue);
		StringBuilder returnValue = new StringBuilder();
		returnValue.append(inputValue.substring(0, 1).toUpperCase()).append(inputValue.substring(1).toLowerCase());
		return returnValue.toString();
	}
    
    public static String AB_AB2abAb(String inputValue) {
    	MyAssert.notNull(inputValue);
		String[] words = inputValue.split("_");
		StringBuilder returnValue = new StringBuilder(words[0].toLowerCase());
		for (int i = 1 ; i < words.length ; i++) {
			returnValue.append(MyStringFormatUtils.toAbcd(words[i]));
		}
		return returnValue.toString();
	}
}
